JioAutomator PR-Agent
Overview
The PR Agent is an AI-powered tool designed to automate and enhance the code review process for pull requests (PRs) on platforms like Azure DevOps. By using AI to review PRs, the PR Agent ensures thorough and efficient code reviews, significantly reducing review time while improving code quality and facilitating seamless collaboration within development teams.
Key Benefits:
1. Automated Code Review: The AI automatically reviews the PR as soon as it is created, identifying concerns, highlighting issues, and providing intelligent feedback.
2. Real-time Suggestions: The PR Agent suggests corrections for code errors, optimizes code structure, and identifies potential security vulnerabilities or inefficiencies.
3. Seamless Collaboration: Comments and reviews from the PR Agent appear directly under the JioAutomator.AI account, allowing for easy interaction within the PR discussion.
4. Context-Aware Feedback: The agent understands the PR's context, including commit messages, descriptions, and code changes, ensuring that feedback is tailored and relevant.
5. Ongoing Reviews: If changes are made to the PR after the initial review, the agent can re-review the updated code and provide additional feedback.
Admin Setup: Integrating PR-Agent with Azure DevOps
Step 1: Log in to JioAutomator
1. The admin logs into their JioAutomator account and navigates to the Integration section.
Step 2: Add a New API Key
1. Click on ‘Add Key’.
2. Fill in the necessary details, such as the key name and description.
3. Click ‘Create’ to generate a new API key.
Step 3: Select PR-Agent in Query Builder
1. Go to the Query Builder.
2. Select ‘PR Agent’ from the list of options.
3. A popup will appear, prompting you to select the API key created in Step 2.
4. After selecting the key, click ‘Next’ and choose Azure DevOps as the integration platform.
Step 4: Retrieve URL and Headers
Once you select Azure DevOps, you will be redirected to a documentation page containing the URL and Headers required for webhook setup.
Step 5: Set up Webhooks in Azure DevOps
1. Go to Azure DevOps and navigate to Project Settings > Service Hooks.
2. Select ‘Webhooks’ as the service and configure it by choosing:
a. Pull Request Create (for when a new PR is created)
b. Pull Request Comment (for when a comment is added to a PR)
3.Click ‘Next’ to proceed.
4. Enter the URL and Headers from the JioAutomator documentation.
5. Click ‘Finish’ to complete the webhook setup for your repository.
Step 6: PR-Agent Setup Completed
Now, the PR-Agent is successfully set up for your Azure DevOps repository. It will begin reviewing new PRs and providing AI-driven feedback directly within the platform.
User Flow: How to Use PR-Agent for Code Reviews
Step 1: Create a Pull Request in Azure DevOps
Once the PR-Agent is integrated, the user can create a Pull Request (PR) in their Azure DevOps repository.
Step 2: AI-Powered Code Review
After the PR is created, the AI automatically reviews the code, inspects the changes, and generates a detailed report identifying potential concerns and issues.
Step 3: AI Suggestions for Code Improvements
The AI provides suggestions for corrections where mistakes or inefficiencies are detected. These suggestions are organized file by file to ensure clarity and ease of reference.
Step 4: AI Comments under JioAutomator.AI Account
The AI’s comments and suggestions are displayed directly within the PR under the JioAutomator.AI account.
Step 5: Trigger Additional Reviews
If the user makes additional changes to the PR and pushes updates:
1. They can add a comment or request a new review to trigger another AI evaluation by typing ‘/review’ in the comment section of the updated PR.
2. The AI will analyze the updated changes and provide new feedback within the comments section.